package com.gxwz.document.business.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.gxwz.document.business.entity.Literature;
import com.gxwz.document.business.entity.Recyclebin;
import com.gxwz.document.business.service.IliteratureService;
import com.gxwz.document.business.service.IrecyclebinService;
import com.gxwz.document.core.action.BaseAction;

@SuppressWarnings("serial")
public class LiteratureAction extends BaseAction{
	protected static final String LIST_JSP = "/WEB-INF/page/literatureManage/Literature_list.jsp";
	protected static final String UPDATE_JSP = "/WEB-INF/page/literatureManage/Literature_update.jsp";
	protected static final String UPLOAD_JSP = "/WEB-INF/page/literatureManage/Literature_upload.jsp";
	protected static final String ZEROLIST_JSP = "/WEB-INF/page/gradeManage/zero_list.jsp";
	protected static final String ONELIST_JSP = "/WEB-INF/page/gradeManage/one_list.jsp";
	protected static final String TWOLIST_JSP = "/WEB-INF/page/gradeManage/two_list.jsp";
	protected static final String THREELIST_JSP = "/WEB-INF/page/gradeManage/three_list.jsp";
	protected static final String JOURNAL_ARTICLE_JSP = "/WEB-INF/page/literatureManage/JournalArticle.jsp";
	protected static final String TREATISE_JSP = "/WEB-INF/page/literatureManage/Treatise.jsp";
	protected static final String PROCEEDINGS_JSP ="/WEB-INF/page/literatureManage/Proceedings.jsp";
	protected static final String BACHELOR_THESIS_JSP = "/WEB-INF/page/literatureManage/BachelorThesis.jsp";
	protected static final String UNDEFINED_JSP = "/WEB-INF/page/literatureManage/Undefined.jsp";
	protected static final String FAIL_JSP = "/WEB-INF/page/Fail.jsp";
	protected static final String DELETED_JSP = "/WEB-INF/page/deleted/deleted_list.jsp";

	
	private Literature lit;
	private List<Literature> ListLit;//分页
	
	private int totalRow  = 0;
	
	@Autowired
	private IliteratureService litService;	
	
	
	
	/**
	 * 跳转到全部文献页面
	 * @return
	 */
	public String openlist(){
		forwardView = LIST_JSP;
		ListLit = litService.findDeletedo(0, 5);
		return SUCCESS;
	}
	/**
	 * 跳转最近删除页面
	 * @return
	 */
	public String openDeletelist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findDeleted((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findDeleted(row,DEFUALT_PAGE_SIZE);
		}
		
		forwardView = DELETED_JSP;
		return SUCCESS;
	}
	
	/**
	 * 跳转到零次文献页面
	 * @return
	 */
	public String openZerolist(){
		forwardView = ZEROLIST_JSP;
		ListLit = litService.findByPageZero(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 跳转到一次文献页面
	 * @return
	 */
	public String openOnelist(){
		forwardView = ONELIST_JSP;
		ListLit = litService.findByPageOne(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 跳转到二次文献页面
	 * @return
	 */
	public String openTwolist(){
		forwardView = TWOLIST_JSP;
		ListLit = litService.findByPageTwo(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 跳转到三次文献页面
	 * @return
	 */
	public String openThreelist(){
		forwardView = THREELIST_JSP;
		ListLit = litService.findByPageThree(0, 5);
		return SUCCESS;
	}
	/**
	 * 跳转到期刊文章页面
	 * @return
	 */
	public String openJournalArticlelist(){
		forwardView = JOURNAL_ARTICLE_JSP;
		ListLit = litService.findByPageJournalArticle(0, 5);
		return SUCCESS;
	}
		
	/**
	 * 跳转专著页面
	 * @return
	 */
	public String openTreatiselist(){
		forwardView = TREATISE_JSP;
		ListLit = litService.findByPageTreatise(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 跳转论文集页面
	 * @return
	 */
	public String openProceedingslist(){
		forwardView = PROCEEDINGS_JSP;
		ListLit = litService.findByPageProceedings(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 跳转学士论文页面
	 * @return
	 */
	public String openBachelorThesislist(){
		forwardView = BACHELOR_THESIS_JSP;
		ListLit = litService.findByPageBachelorThesis(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 跳转未定义页面
	 * @return
	 */
	public String openUndefinedlist(){
		forwardView = UNDEFINED_JSP;
		ListLit = litService.findByPageUndefined(0, 5);
		return SUCCESS;
	}
	
	/**
	 * 全部文献分页查询
	 * @return
	 */
	@SuppressWarnings("rawtypes")
	public String list(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findDeletedo((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else{
			ListLit = litService.findDeletedo(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(LIST_JSP);
		return SUCCESS;
	}
    @SuppressWarnings("rawtypes")
	public String list1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findDeleted((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findDeleted(row,DEFUALT_PAGE_SIZE);
		}
		
		setForwardView(DELETED_JSP);
		return SUCCESS;
	
	}
	
	/**
	 * 零次文献分页查询
	 * @return
	 */
	public String zerolist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageZero((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageZero(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(ZEROLIST_JSP);
		return SUCCESS;
	}
	public String zerolist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageZeroDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageZeroDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 一次文献分页查询
	 * @return
	 */
	public String onelist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageOne((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageOne(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(ONELIST_JSP);
		return SUCCESS;
	}
	public String onelist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageOneDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageOneDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 二次文献分页查询
	 * @return
	 */
	public String twolist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageTwo((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageTwo(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(TWOLIST_JSP);
		return SUCCESS;
	}
	public String twolist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageTwoDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageTwoDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 三次文献分页查询
	 * @return
	 */
	public String threelist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageThree((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageThree(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(THREELIST_JSP);
		return SUCCESS;
	}
	public String threelist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageThreeDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageThreeDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 期刊文章分页查询
	 * @return
	 */
	public String journalArticlelist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageJournalArticle((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageJournalArticle(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(JOURNAL_ARTICLE_JSP);
		return SUCCESS;
	}
	public String journalArticlelist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageJournalArticleDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageJournalArticleDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 专著分页查询
	 * @return
	 */
	public String treatiselist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageTreatise((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageTreatise(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(TREATISE_JSP);
		return SUCCESS;
	}
	public String treatiselist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageTreatiseDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageTreatiseDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 论文集分页查询
	 * @return
	 */
	public String proceedingslist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageProceedings((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageProceedings(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(PROCEEDINGS_JSP);
		return SUCCESS;
	}
	public String proceedingslist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageProceedingsDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageProceedingsDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 学士论文分页查询
	 * @return
	 */
	public String bachelorThesislist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageBachelorThesis((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageBachelorThesis(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(BACHELOR_THESIS_JSP);
		return SUCCESS;
	}
	public String bachelorThesislist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageBachelorThesisDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageBachelorThesisDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 *未定义分页查询
	 * @return
	 */
	public String undefinedlist(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageUndefined((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageUndefined(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(UNDEFINED_JSP);
		return SUCCESS;
	}
	public String undefinedlist1(){
		row = (page-1)*DEFUALT_PAGE_SIZE; 
		totalRow = litService.getRowNum();
		if(page>(litService.getRowNum()/DEFUALT_PAGE_SIZE+1)){
			page--;
		}
		if(row > litService.getRowNum() || maxpage == 1){
			ListLit = litService.findByPageUndefinedDel((litService.getRowNum()-(litService.getRowNum()%DEFUALT_PAGE_SIZE)),DEFUALT_PAGE_SIZE);
		}else if(lit != null){
			ListLit = litService.findByOder(lit, row, DEFUALT_PAGE_SIZE);
		}else {
			ListLit = litService.findByPageUndefinedDel(row,DEFUALT_PAGE_SIZE);
		}
		setForwardView(DELETED_JSP);
		return SUCCESS;
	}
	
	/**
	 * 跳转到全部文献修改页面
	 * @return
	 */
	public String openUpdate(){
		lit=litService.findById(lit.getLitId());
		System.out.println("hahahahhahah");
		forwardView = UPDATE_JSP;
		return SUCCESS;
	}
	
	/**
	 * 文献上传
	 * @return
	 * @throws Exception 
	 */
	public String openupload() throws Exception{
		forwardView = UPLOAD_JSP;
		return SUCCESS;
		}
	
	/**
	 *文献修改
	 * @return
	 */
	public String update() throws Exception{
		System.out.println(lit.getLitSize());
		litService.update(lit);
		return list();
		}
	
	/**
	 *文献删除
	 * @return
	 */
	public String delete() throws Exception{
		litService.delete(lit.getLitId());
		return list1();
	}
	/**
	 *文献状态改变成1
	 * @return
	 */
	public String deleteo() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return list();
	}
	/**
	 *文献状态改变为0
	 * @return
	 */
	public String delete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return list1();
	}
			
	/**
	 *零次文献删除
	 * @return
	 */
	public String zeroDelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return zerolist();
	}
	public String zeroDelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return zerolist1();
	}
	
	/**
	 *一次文献删除
	 * @return
	 */
	public String oneDelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return onelist();
	}
	public String oneDelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return onelist1();
	}
	
	/**
	 *二次文献删除
	 * @return
	 */
	public String twoDelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return twolist();
	}
	public String twoDelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return twolist1();
	}
	
	/**
	 *三次文献删除
	 * @return
	 */
	public String threeDelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return threelist();
	}
	public String threeDelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return threelist1();
	}
	
	/**
	 *期刊文章删除
	 * @return
	 */
	public String journalArticledelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return journalArticlelist();
	}
	public String journalArticledelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return journalArticlelist1();
	}
	
	/**
	 *专著删除
	 * @return
	 */
	public String treatisedelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return treatiselist();
	}
	public String treatisedelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return treatiselist1();
	}
	/**
	 *论文集删除
	 * @return
	 */
	public String proceedingsdelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return proceedingslist();
	}
	public String proceedingsdelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return proceedingslist1();
	}
	
	/**
	 *学士论文删除
	 * @return
	 */
	public String bachelorThesisdelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return bachelorThesislist();
	}
	public String bachelorThesisdelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return bachelorThesislist1();
	}
	/**
	 *未定义删除
	 * @return
	 */
	public String undefineddelete0() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(1);
		litService.update(lit);
		return undefinedlist();
	}
	public String undefineddelete1() throws Exception{
		lit = litService.findById(lit.getLitId());//先将数据查询出来之后再更新
		lit.setDeleted(0);
		litService.update(lit);
		return undefinedlist1();
	}

	
	public Literature getLit() {
		return lit;
	}

	public void setLit(Literature lit) {
		this.lit = lit;
	}

	public List<Literature> getListLit() {
		return ListLit;
	}

	public void setListLit(List<Literature> listLit) {
		ListLit = listLit;
	}

	public int getTotalRow() {
		return totalRow;
	}

	public void setTotalRow(int totalRow) {
		this.totalRow = totalRow;
	}
	



}
